package com.ihr360.oneclick.service;

import com.ihr360.oneclick.dto.spreadsheet.SpreadsheetColumnDto;
import com.ihr360.oneclick.entity.RowHeaderColumn;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * @author tom
 * @date 17-12-27
 */
public interface RowHeaderColumnService {


    /**
     * excel过滤
     *
     * @param file
     * @return
     */
    List<Map> excelFieldFilter(MultipartFile file, String termId);

    /**
     * 字段映射
     *
     * @param termId
     * @return
     */
    List<Map<String, RowHeaderColumn>> getExcelFieldMapping(String termId);

    /**
     * 获取term 固定列的meta List
     *
     * @param termId OneClickTermDto.id
     * @return list
     */
    List<RowHeaderColumn> getTermFixedColumnMetaList(String termId);

    /**
     * 获取term 列的meta List
     *
     * @param termId OneClickTermDto.id
     * @return list
     */
    List<RowHeaderColumn> getTermColumnMetaList(String termId);

    /**
     * 获取term 固定列的meta Map
     *
     * @param termId OneClickTermDto.id
     * @return Map columnFieldMeta > RowHeaderColumn
     */
    Map<String, RowHeaderColumn> getTermFixedColumnMetaMap(String termId);

    /**
     * 获取term 列的meta Map
     *
     * @param termId OneClickTermDto.id
     * @return Map columnFieldMeta > RowHeaderColumn
     */
    Map<String, RowHeaderColumn> getTermColumnMetaMap(String termId);

    /**
     * 获取电子表格固定列 List
     *
     * @param spreadsheetId SpreadsheetDto.id
     * @return List
     */
    List<RowHeaderColumn> getSpreadsheetColumnList(String spreadsheetId);

    /**
     * 获取电子表格固定列 Map
     *
     * @param spreadsheetId SpreadsheetDto.id
     * @return RowHeaderColumn Map
     */
    Map<String, RowHeaderColumn> getSpreadsheetColumnMap(String spreadsheetId);

    /**
     * SpreadsheetColumnDto List 转换 RowHeaderColumn List
     *
     * @param columnDtoList 列信息
     * @return List
     */
    List<RowHeaderColumn> spreadsheetColumnDtoListConvertColumnList(List<SpreadsheetColumnDto> columnDtoList);

    /**
     * SpreadsheetColumnDto List 转换 RowHeaderColumn Map
     *
     * @param columnDtoList 列信息
     * @return Map
     */
    Map<String, RowHeaderColumn> spreadsheetColumnDtoListConvertMap(List<SpreadsheetColumnDto> columnDtoList);

    /**
     * 获取电子表格的表头信息
     *
     * @param spreadsheetId SpreadsheetDto.id
     * @return RowHeaderColumn list
     */
    List<RowHeaderColumn> getSpreadsheetRowHeaderColumnList(String spreadsheetId);


    /**
     * 获取term 模板数据
     *
     * @param templateType
     * @param termId
     * @return
     */
    List<Object> getTermExampleDataList(String termId, String templateType);

    /**
     * 获取term 模板表头信息
     *
     * @param termId       OneClickTermDto.id
     * @param templateType
     * @return list
     */
    List<RowHeaderColumn> getTermTemplateDataList(String termId, String templateType);

    /**
     * 获取页面说明配置
     */
    String getTipTemplate(String termId);

    /**
     * 查询员工名录导出表头
     */
    List<RowHeaderColumn> getStaffRecordHead();


}
